<div id="pad-wrapper" class="new-user">
	<div class="row-fluid header">
		<h3>编辑统计源</h3>
	</div>
	<div class="row-fluid form-wrapper">
		<!-- left column -->
		<div class="span9 with-sidebar">
			<div class="container">
				<form class="new_user_form form-horizontal" action="/source-statistics/save" method="post" id="dataForm" enctype="multipart/form-data">
					<input type="hidden" name="id" value="<?php echo $row['id']?>">
					<div class="field-box"></div>
					<div class="control-group form-group span12">
						<label class="control-label" for="banner_name">资源名称:</label>
						<div class="controls col-lg-5">
							<input type="text" class="form-control" id="description" name="description" value="<?php echo $row['description']?>" placeholder="资源名称"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="banner_name">访问数:</label>
						<div class="controls col-lg-5">
							<label><?php echo $row['num']?></label>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="banner_name">二维码图:</label>
						<div class="controls col-lg-5">
							<?php if($row['qrcode_file']):?>
							<a href="<?php echo STATIC_IMAGE . $row['qrcode_file']?>" target="_blank"><img src="<?php echo STATIC_IMAGE . $row['qrcode_file']?>"></a>
							<?php endif;?>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="link">跳转连接:</label>
						<div class="controls col-lg-5">
							<input type="text" class="form-control span8" name="link" placeholder="http://" value="<?php echo $row['link']?>"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="image">显示图片:</label>
						<div class="controls col-lg-5">
							<?php if($row['image']):?>
							<img src="<?php echo STATIC_IMAGE . $row['image']?>" style="width: 50px; heigh:50px">
							<?php endif;?>
						
							<input class="form-control" type="file" accept="image/*" name="image"/>
						</div>
					</div>
					<div class="control-group form-group span12">
						<label class="control-label" for="status">状态:</label>
						<div class="controls col-lg-5">
							<div class="ui-select span1">
								<select name="status">
									<option value="1" <?php if($row['status'] == 1):?> selected <?php endif;?>>使用</option>
									<option value="2" <?php if($row['status'] == 2):?> selected <?php endif;?>>禁用</option>
								</select>
							</div>
						</div>
					</div>
					<div class="span12 field-box"></div>
					<div class="control-group form-group span12 actions">
						<label class="control-label" for="" class="control-label"></label>
						<div class="controls col-lg-5">
							<input type="submit" class="btn-glow primary" value="提交" />
						</div>
					</div>
				</form>
			</div>
		</div>
		<!-- side right column -->
		<div class="span3 form-sidebar pull-right">
		</div>
	</div>	
	<script type="text/javascript">
	$(document).ready(function() {
		$('#dataForm').bootstrapValidator({
			message: 'This value is not valid',
			feedbackIcons: {
				valid: 'glyphicon glyphicon-ok',
				invalid: 'glyphicon glyphicon-remove',
				validating: 'glyphicon glyphicon-refresh'
			},
			fields: {
				description: {
					message: '资源名称不符合规则',
					validators: {
						notEmpty: {
							message: '资源名称是必填项，不能为空'
						}
					}
				},
				
				
			}
		});
	});
	</script>
</div>